#include "ClassWithIntegers.h"

QString COLUMN_NAME_ATTRIBUTEUSHORT = "attributeUShort";
QString COLUMN_NAME_ATTRIBUTEINT = "attributeInt";
QString COLUMN_NAME_ATTRIBUTEUNSIGNEDLONGINT = "attributeUnsignedLongInt";
QString COLUMN_NAME_ATTRIBUTEUNSIGNEDINT = "attributeUnsignedInt";
QString COLUMN_NAME_ATTRIBUTELONGINT = "attributeLongInt";
QString COLUMN_NAME_ATTRIBUTEULONGINT = "attributeULongInt";
QString COLUMN_NAME_ATTRIBUTESHORT = "attributeShort";
QString COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORT = "attributeUnsignedShort";
QString COLUMN_NAME_ATTRIBUTESHORTINT = "attributeShortInt";
QString COLUMN_NAME_ATTRIBUTEUNSIGNEDLONG = "attributeUnsignedLong";
QString COLUMN_NAME_ATTRIBUTEUINT = "attributeUInt";
QString COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORTINT = "attributeUnsignedShortInt";

QString COLUMN_TYPE_ATTRIBUTEUSHORT = "ushort";
QString COLUMN_TYPE_ATTRIBUTEINT = "int";
QString COLUMN_TYPE_ATTRIBUTEUNSIGNEDLONGINT = "unsigned long int";
QString COLUMN_TYPE_ATTRIBUTEUNSIGNEDINT = "unsigned int";
QString COLUMN_TYPE_ATTRIBUTELONGINT = "long int";
QString COLUMN_TYPE_ATTRIBUTEULONGINT = "ulong";
QString COLUMN_TYPE_ATTRIBUTESHORT = "short";
QString COLUMN_TYPE_ATTRIBUTEUNSIGNEDSHORT = "unsigned short";
QString COLUMN_TYPE_ATTRIBUTESHORTINT = "short int";
QString COLUMN_TYPE_ATTRIBUTEUNSIGNEDLONG = "unsigned long";
QString COLUMN_TYPE_ATTRIBUTEUINT = "unsigned int";
QString COLUMN_TYPE_ATTRIBUTEUNSIGNEDSHORTINT = "unsigned short int";

ClassWithIntegersBear::ClassWithIntegersBear()
{
    m_object = new BBObject;
    m_object->setName( "ClassWithIntegers" );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEUSHORT, COLUMN_TYPE_ATTRIBUTEUSHORT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUSHORT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEINT, COLUMN_TYPE_ATTRIBUTEINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEINT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONGINT, COLUMN_TYPE_ATTRIBUTEUNSIGNEDLONGINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONGINT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEUNSIGNEDINT, COLUMN_TYPE_ATTRIBUTEUNSIGNEDINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDINT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTELONGINT, COLUMN_TYPE_ATTRIBUTELONGINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTELONGINT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEULONGINT, COLUMN_TYPE_ATTRIBUTEULONGINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEULONGINT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTESHORT, COLUMN_TYPE_ATTRIBUTESHORT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTESHORT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORT, COLUMN_TYPE_ATTRIBUTEUNSIGNEDSHORT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTESHORTINT, COLUMN_TYPE_ATTRIBUTESHORTINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTESHORTINT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONG, COLUMN_TYPE_ATTRIBUTEUNSIGNEDLONG );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONG, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEUINT, COLUMN_TYPE_ATTRIBUTEUINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUINT, NULL );
    m_object->setAttributeType( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORTINT, COLUMN_TYPE_ATTRIBUTEUNSIGNEDSHORTINT );
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORTINT, NULL );
    addObject( m_object );
}

ushort ClassWithIntegersBear::getAttributeUShort()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUSHORT ).toUInt();
}

void ClassWithIntegersBear::setAttributeUShort( ushort value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUSHORT, value );
}

int ClassWithIntegersBear::getAttributeInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEINT ).toInt();
}

void ClassWithIntegersBear::setAttributeInt( int value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEINT, value );
}

unsigned long int ClassWithIntegersBear::getAttributeUnsignedLongInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONGINT ).toUInt();
}

void ClassWithIntegersBear::setAttributeUnsignedLongInt( unsigned long int value )
{
    qulonglong ulongValue = value;
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONGINT, ulongValue );
}

unsigned int ClassWithIntegersBear::getAttributeUnsignedInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDINT ).toUInt();
}

void ClassWithIntegersBear::setAttributeUnsignedInt( unsigned int value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDINT, value );
}

long int ClassWithIntegersBear::getAttributeLongInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTELONGINT ).toInt();
}

void ClassWithIntegersBear::setAttributeLongInt( long int value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTELONGINT, value );
}

ulong ClassWithIntegersBear::getAttributeULongInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEULONGINT ).toUInt();
}

void ClassWithIntegersBear::setAttributeULongInt( ulong value )
{
    qulonglong ulongValue = value;
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEULONGINT, ulongValue );
}

short ClassWithIntegersBear::getAttributeShort()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTESHORT ).toInt();
}

void ClassWithIntegersBear::setAttributeShort( short value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTESHORT, value );
}

unsigned short ClassWithIntegersBear::getAttributeUnsignedShort()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORT ).toUInt();
}

void ClassWithIntegersBear::setAttributeUnsignedShort( unsigned short value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORT, value );
}

short int ClassWithIntegersBear::getAttributeShortInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTESHORTINT ).toInt();
}

void ClassWithIntegersBear::setAttributeShortInt( short int value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTESHORTINT, value );
}

unsigned long ClassWithIntegersBear::getAttributeUnsignedLong()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONG ).toUInt();
}

void ClassWithIntegersBear::setAttributeUnsignedLong( unsigned long value )
{
    qulonglong ulongValue = value;
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDLONG, ulongValue );
}

unsigned int ClassWithIntegersBear::getAttributeUInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUINT ).toUInt();
}

void ClassWithIntegersBear::setAttributeUInt( unsigned int value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUINT, value );
}

unsigned short int ClassWithIntegersBear::getAttributeUnsignedShortInt()
{
    return m_object->getAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORTINT ).toUInt();
}

void ClassWithIntegersBear::setAttributeUnsignedShortInt( unsigned short int value )
{
    m_object->setAttributePrimitiveValue( COLUMN_NAME_ATTRIBUTEUNSIGNEDSHORTINT, value );
}

